home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / inites / testini.bas < prev    next >
BASIC Source File  |  1995-10-23  |  21KB  |  197 lines

  1.     Option Explicit
  2. '*************************************************************************'
  3. '*                                                                       *'
  4. '*        Program Name: TESTINI                                          *'
  5. '*                                                                       *'
  6. '*             Created: Sept 94             By: Christophe Tricaud       *'
  7. '*                                              Compuserve N░ 100412,2653*'
  8. '*                                              Paris, France.           *'
  9. '*            Modified:              By:                                 *'
  10. '*                                                                       *'
  11. '*            Comments: This small program shows easy use of INI function*'
  12. '*                      for those who do not want to use API. Just use   *'
  13. '*                      the few functions of this program which are      *'
  14. '*                      sufficient.                                      *'
  15. '*                                                                       *'
  16. '*************************************************************************'
  17.  
  18. '                                                                                                                                                                                                                                                                       '
  19. '                                                                                                                                                                                                                                                                        '
  20. 'Global Constants declaration                                                                                                                                                                                                                                             '
  21. '                                                                                                                                                                                                                                                                          '
  22. '                                                                                                                                                                                                                                                                           '
  23.     Global Const WM_WININICHANGE = &H1A
  24.     Global Const nSize = 128
  25.     Global Const HWND_BROADCAST = &HFFFF
  26.     Global Const SPI_SETDESKPATTERN = 21
  27.     Global Const SPI_SETBORDER = 6
  28.     Global Const SPI_SETBEEP = 2
  29.     Global Const SPI_SETDESKWALLPAPER = 20
  30.     Global Const SPI_SETDOUBLECLICKTIME = 32
  31.     Global Const SPI_SETSCREENSAVEACTIVE = 17
  32.     Global Const SPI_SETSCREENSAVETIMEOUT = 15
  33.     Global Const SPIF_SENDWININICHANGE = 2
  34.     Global Const SPIF_UPDATEINIFILE = 1
  35. '                                                                                                                                                                                                                                                   '
  36. '                                                                                                                                                                                                                                                    '
  37. 'Type declarations                                                                                                                                                                                                                               '
  38. '                                                                                                                                                                                                                                                      '
  39. '                                                                                                                                                                                                                                                       '
  40.     Type RECT
  41.       Left As Integer
  42.       Top As Integer
  43.       right As Integer
  44.       Bottom As Integer
  45.     End Type
  46. '                                                                                                                                                                                                                                                                                                   '
  47. '                                                                                                                                                                                                                                                                                                    '
  48. 'API declaration                                                                                                                                                                                                                                                                                      '
  49. '                                                                                                                                                                                                                                                                                                      '
  50. '                                                                                                                                                                                                                                                                                                       '
  51.     Declare Function GetPrivateProfileString% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName As Any, ByVal lpDefault$, ByVal lpReturnedString$, ByVal nSize%, ByVal lpFileName$)
  52.     Declare Function WritePrivateProfileString% Lib "Kernel" (ByVal lpApplicationName$, ByVal lpKeyName As Any, ByVal lpString As Any, ByVal lplFileName$)
  53.     Declare Function GetWindowsDirectory Lib "Kernel" (ByVal lpBuffer As String, ByVal nSize As Integer) As Integer
  54.     Declare Function SystemParametersInfo Lib "User" (ByVal uAction As Integer, ByVal uParam As Integer, ByVal lpvParam As String, ByVal fuWinIni As Integer) As Integer
  55.     Declare Function SendMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As String) As Long
  56.     Declare Function PostMessage Lib "User" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, ByVal lParam As String) As Long
  57.     Declare Function CreateSolidBrush Lib "GDI" (ByVal crColor As Long) As Integer
  58.     Declare Function DeleteObject Lib "GDI" (ByVal hObject As Integer) As Integer
  59.     Declare Function FillRect Lib "User" (ByVal hDC As Integer, lpRect As RECT, ByVal hBrush As Integer) As Integer
  60. '                                                                                                                                                                                                                                                   '
  61. '                                                                                                                                                                                                                                                    '
  62. 'Variables declarations                                                                                                                                                                                                                               '
  63. '                                                                                                                                                                                                                                                      '
  64. '